# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dasel
pkgver=1.26.0
pkgrel=0
pkgdesc="Query and modify data structures using selector strings"
url="https://daseldocs.tomwright.me/"
license="MIT"
arch="all"
makedepends="go"
source="https://github.com/TomWright/dasel/archive/v$pkgver/dasel-$pkgver.tar.gz"

export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath -modcacherw"
export CGO_ENABLED=0

build() {
	go build -ldflags "
		-X github.com/tomwright/dasel/internal.Version=$pkgver
		" ./cmd/dasel
}

check() {
	go test ./...
}

package() {
	install -Dm755 dasel -t "$pkgdir"/usr/bin/
}

sha512sums="
7467c075c84543dc656a2ce5f92d49a23585b65b75179fb31a3c89f859a47d09caf4628c39da2a54aa5625005b6eae16054f1a0203f338d8e9684170c5adbff3  dasel-1.26.0.tar.gz
"
